package com.llu.jackson.poc.baseExp.bean;

import com.fasterxml.jackson.annotation.JsonTypeInfo;

public class Person {
    private int age;
    private String name;
    @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
    private Object object;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    @Override
    public String toString() {
        return String.format("Person.age=%d, Person.name=%s, %s", age, name, object == null ? "null" : object);
    }
}
